def solve(n):
    dp=[0]*n 
    dp[0]=1
    for i in range(1,n):
        tmp=i+1
        for j in range(i-1):
            tmp=max(tmp,dp[j]*dp[i-1-j])
        dp[i]=tmp 
    return dp[-1]

print(solve(8))
